<template>
	<div class="transport-warp" style="margin-top: 0;">
		<div class="identity-type">
			<span>基本信息</span>
		</div>
		<div class="essen_list  transport_after transport_after2">
			<p>
				<span>车牌号</span>
				<b>{{transferInfoVo.carNo}}</b>
			</p>
			<p>
				<span>司机姓名</span>
				<b>{{transferInfoVo.driver}}</b>
			</p>
			<p>
				<span>司机电话</span>
				<b>{{transferInfoVo.phone}}</b>
			</p>
			<p>
				<span>司机身份证</span>
				<b>{{transferInfoVo.idCard}}</b>
			</p>
		</div>
		<div class="essen_list transport_after transport_after1" style="border: 0;">
			<p>
				<span>装车时间</span>
				<b>{{transferInfoVo.uploadTime | Slice}}</b>
			</p>
			<p>
				<span style="width: 6rem;">预计到达时间</span>
				<b>{{transferInfoVo.planTime | Slice}}</b>
			</p>
			<p>
				<span>装车物料总量</span>
				<b>{{transferInfoVo.weight?transferInfoVo.weight:0}}<em>吨</em></b>
			</p>
		</div>
		<!--物料列表-->
		<div class="identity-type">
			<span>物料列表</span>
		</div>
		<div class="material-list">
			<ul class="material_list transport-list">
				<li  v-for='(item,index) in goodsVoList' :key=index>
					<p>
						<span>{{item.goodsName}}</span>
						<img src="../../images/right.png" />
					</p>
					<p>
						<span>物料重量</span>
						<b>{{item.goodsWeight}}<em>吨</em></b>
					</p>
					<p>
						<span>订单编号</span>
						<b>{{item.orderNo}}</b>
					</p>

				</li>
			</ul>
			<ol class="transport_photo_list">
				<!-- <li>
					<img src="../../images/squarePhoto.png" />
					<span>车牌号</span>
				</li>
				<li>
					<img src="../../images/squarePhoto.png" />
					<span>司机照片1</span>
				</li>
				<li>
					<img src="../../images/squarePhoto.png" />
					<span>司机照片2</span>
				</li>
				<li>
					<img src="../../images/squarePhoto.png" />
					<span>身份证正面</span>
				</li>
				<li>
					<img src="../../images/squarePhoto.png" />
					<span>榜单</span>
				</li> -->
			</ol>
		</div>
	</div>
</template>

<script>
	import { getTransInfo } from '../../config/api'
	import { Toast } from 'we-vue'
	export default{
		data(){
			return {
				transferInfoVo:'',
				goodsVoList:'',
				urlVo:[]
			}
		},
		mounted(){
			let carNo = this.$route.query.carNo
			let orderNo = this.$route.query.orderNo
			getTransInfo(carNo,orderNo).then(res=>{
				console.log(res)
				if(res.code==100){
					this.transferInfoVo = res.content.transferInfoVo
					this.goodsVoList = res.content.goodsVoList
					this.urlVo = res.content.urlVo
				}else{
					Toast.fail('暂无数据')
				}
				
			}).catch(err=>console.log(err))
		},
		filters: {
			Slice(value) {
				if(value){
					return value.slice(0,19);
				}else{
					return 
				}	
			}
		}
	}
</script>

<style lang="less" scoped>
	.transport-warp .essen_list p{
		height: auto;
		border-bottom: 0
	}
</style>
